/**
  * Menu Theme: dropdown3
  * Theme ID: d3
  * Author: Minwe (minwe@yunshipei.com)
  */

.am-menu-dropdown3 {

  @trigger-color: #fff;
  @trigger-active-color: #F2F3F5;

  @lv2-color: #2A2D32;
  @lv2-bg-color: #F2F3F5;

  //@lv2-active-bg-color: #727B8A;

  @lv3-color: #7E858F;
  @lv3-bg-color: #fff;
  @lv3-icon-color: #aaa;

  @border-color: #D3D6DB;

  a {
    &::before, &::after {
      .am-icon-font;
    }
  }
  // level 1: trigger bars
  > .am-parent {
    position: relative;
    > a {
      position: absolute;
      right: 10px;
      top: -36px;
      width: auto;
      height: 24px;
      padding: 0;
      text-align: right;
      color: @trigger-color;
      &::after {
        .transition(all 0.3s);
        margin-left: 6px;
        content: @fa-var-caret-down;
      }
    }

    &.am-open {
      > a {
        color: @trigger-active-color;
        &::after {
          content: @fa-var-caret-up;
        }
        &::before {
          content: @fa-var-caret-up;
          position: absolute;
          font-size: 24px;
          color: @lv2-bg-color;
          bottom: -15px;
        }
      }
    }
  }

  // hide sub menu
  .am-menu-sub {
    display: none;
  }

  .am-menu-lv2 {
    position: absolute;
    top: -5px;
    left: 50px;
    right: 10px;
    background-color: @lv2-bg-color;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
    z-index: 1999;
    a {
      padding: 0.8rem;
    }
    & > li {

      // parent links
      > a {
        border-bottom: 1px solid @border-color;
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
        color: @lv2-color;
      }

      &.am-parent {
        > a {
          position: relative;
          &::after {
            content: @fa-var-angle-right;
            margin-left: 0.8rem;
          }
        }

        // active status
        &.am-open {
          border-bottom: 1px solid @border-color;
          box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
          > .am-menu-lv3 {
            background-color: @lv3-bg-color;
          }
          > a {
            border-bottom: none;
            &::after {
              content: @fa-var-angle-down;
            }
          }
        }
      }
    }
  }

  .am-menu-lv3 {
    a {
      color: @lv3-color;
      padding: 0.5rem 0.5rem 0.5rem 3rem;
      &::before {
        content: @fa-var-angle-right;
        color: @lv3-icon-color;
        font-size: 16px;
        margin-right: 5px;
      }
    }
  }
  .hook-am-menu-dropdown3;

  @media (min-width: @breakpoint-md) {
    & {
      > .am-parent {
        > a {
          display: none;
        }
      }

      .am-menu-lv2 {
        position: static;
        display: block;
        & > li {
          clear: none;

        }
      }

      .am-menu-lv3 {
        & > li {
          clear: none;
          width: auto;
        }
      }
    }
  }
}

.hook-am-menu-dropdown3() {
}